//
//  ZXConfirmButton.m
//  ZhiXingUser
//
//  Created by Cocoa on 2019/4/8.
//  Copyright © 2019年 QiaoLi. All rights reserved.
//

#import "ZXConfirmButton.h"
#import "UIImage+Gradient.h"

@implementation ZXConfirmButton

+ (instancetype)confirmButton {
    return [[self class] buttonWithType:UIButtonTypeSystem];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)coder
{
    self = [super initWithCoder:coder];
    if (self) {
        [self setupUI];
    }
    return self;
}
- (void)setupUI {
    if (self.currentTitle.isHaveStr == NO) {
        self.k_title(@"确定");
    }
    UIImage *btnBackgroundImg = [[UIImage new] createImageWithSize:CGSizeMake(300, 46) gradientColors:@[UIColor.k_hexColor(0x6BA4FE), UIColor.k_hexColor(0x3A85F9)] percentage:@[@0.0,@1.0] gradientType:GradientFromLeftToRight];
    self.k_bgImg(btnBackgroundImg).k_cornerRadius(20.f);
    self.k_titleColor(UIColor.whiteColor);
    
    
}

@end
